<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "me_task".
 *
 * @property integer $id
 * @property integer $userid
 * @property integer $type
 * @property string $publicode
 * @property string $title
 * @property string $vote_address
 * @property integer $task_price_id
 * @property integer $number
 * @property integer $single_meet
 * @property string $note
 * @property string $evaluation
 * @property string $areaname
 * @property integer $ordersenddate
 * @property integer $end_at
 * @property integer $is_speed
 * @property integer $speed_limit
 * @property integer $sample_figure_count
 * @property string $sample_figure
 * @property string $qrcode
 * @property string $description
 * @property integer $is_offer_mobile
 * @property integer $status
 * @property integer $senddate
 * @property integer $stopdate
 * @property integer $stopcashback
 * @property integer $nosheetcount
 * @property integer $reflash_at
 * @property string $considerations
 * @property string $step_01
 * @property string $step_02
 * @property string $step_03
 * @property string $step
 * @property string $stepfile
 * @property integer $created_at
 * @property integer $updated_at
 */
class Task extends \yii\db\ActiveRecord {

    /**
     * @inheritdoc
     */
    public static function tableName() {
        return 'me_task';
    }

    /**
     * @inheritdoc
     */
    public function rules() {
        return [
            [['userid', 'type', 'title'], 'required'],
            [['userid', 'type', 'task_price_id', 'number', 'single_meet', 'ordersenddate', 'end_at', 'is_speed', 'speed_limit', 'sample_figure_count', 'is_offer_mobile', 'status', 'senddate', 'stopdate', 'stopcashback', 'nosheetcount', 'reflash_at', 'created_at', 'updated_at'], 'integer'],
            [['vote_address', 'note', 'evaluation', 'sample_figure', 'qrcode', 'description', 'considerations', 'step_01', 'step_02', 'step_03','step','stepfile'], 'string'],
            [['publicode'], 'string', 'max' => 200],
            [['title'], 'string', 'max' => 255],
            [['areaname'], 'string', 'max' => 100],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels() {
        return [
            'id' => '任务自增ID',
            'userid' => '商户编号',
            'type' => '任务类型',
            'publicode' => '关注微信号',
            'title' => '标题',
            'vote_address' => '投票地址',
            'task_price_id' => '单价',
            'number' => '数量',
            'single_meet' => '单人可接',
            'note' => '简介',
            'evaluation' => '评价内容',
            'areaname' => '限定区域',
            'ordersenddate' => '预约发布时间',
            'end_at' => '截止日期(选填)',
            'is_speed' => '限速',
            'speed_limit' => '设置限速',
            'sample_figure_count' => '样图数量',
            'sample_figure' => '样图',
            'qrcode' => '二维码',
            'description' => '备注',
            'is_offer_mobile' => '是否提供账号或手机账号',
            'status' => '任务状态',
            'senddate' => '发布日期',
            'stopdate' => '暂停时间',
            'stopcashback' => '暂停返现',
            'nosheetcount' => '备用总量',
            'reflash_at' => '刷新时间',
            "considerations" => "注意事项",
            'step_01' => "任务步骤1",
            'step_02' => "任务步骤2",
            'step_03' => "任务步骤3",
            'step'=>"任务步骤",
            "stepfile"=>"任务步骤图片",
            'created_at' => '创建时间',
            'updated_at' => '更新时间',
        ];
    }

}
